'use strict';

const { validatorSensitive } = require('../common/index');

module.exports = {
  content: [
    { type: 'string', message: '房屋介绍必须为字符串' },
    { min: 0, max: 1000, message: '房屋介绍长度最1000字' },
    { validator: validatorSensitive() },
  ],
  houseArea: [
    { type: 'number', message: '房屋面积必须是数字' },
    { type: 'number', min: 0, max: 100000, message: '面积最大为100000' },
  ],
  direction: [
    { type: 'string', message: '房子朝向必须为字符串' },
    { min: 0, max: 10, message: '房子朝向长度最大20字' },
    { validator: validatorSensitive() },
  ],
  floor: [
    { type: 'string', message: '房屋楼层必须为字符串' },
    { min: 0, max: 20, message: '房屋楼层长度最大20字' },
    { validator: validatorSensitive() },
  ],
  type: [
    { type: 'string', message: '房屋房型必须为字符串' },
    { min: 0, max: 1000, message: '房屋房型长度最大1000字' },
    { validator: validatorSensitive() },
  ],
  remarks: [
    { type: 'string', message: '房屋备注必须为字符串' },
    { min: 0, max: 1000, message: '房屋备注长度最大20字' },
    { validator: validatorSensitive() },
  ],
  personNum: [
    { type: 'number', message: '宜居人数必须是数字' },
    { type: 'number', min: 0, max: 100000, message: '宜居人数最大为100000' },
  ],
};
